package com.naiterui.ehp.bs.recommend.repository.mongo;

import java.util.Date;
import java.util.List;
import java.util.Set;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

import com.naiterui.common.repository.core.BaseMongoRepository;
import com.naiterui.ehp.bs.recommend.bean.mongo.AssistRevisit;

/**
 * @author gaoliangliang
 * @date 2019-06-20 21:31
 * @since 1.0.0
 */
@Repository
public interface IAssistRevisitRepository extends BaseMongoRepository<AssistRevisit, String> {

    Page<AssistRevisit> findByDoctorIdAndDueAtBetween(Long doctorId, Date gtDate, Date ltDate, Pageable pageable);

    List<AssistRevisit> findByDueAtBetween(Date gtDate, Date ltDate);

    Page<AssistRevisit> findByDoctorIdAndPatientIdAndDueAtBetween(Long doctorId, Long patientId, Date gtDate, Date ltDate, Pageable pageable);

    int countByRecomIdIn(Set<Long> recomIds);
}
